package com.ruicar.afs.cloud.common.mq.rabbit.message;

import com.alibaba.fastjson.annotation.JSONField;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumDeserializer;
import com.ruicar.afs.cloud.common.core.enums.AfsEnumSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>Description: </p>
 *
 * @author ZC.GUO
 * @version 1.0
 * @date create on 2020-06-19 18:45
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class AfsTransEntity<T> implements Serializable {

    /**
     * Trans code
     * <p>Description: 交易码</p>
     */
    @JSONField(deserializeUsing = AfsEnumDeserializer.class, serializeUsing = AfsEnumSerializer.class)
    private MqTransCode transCode;


    /**
     * Data
     * <p>Description: 交易体</p> 不能为 list set 等类型会报错!!!!!!!!!!!!
     */
    private T data;
}
